package chances.webui.taglibs;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import chances.webui.model.Tab;

@SuppressWarnings("serial")
public class TabPanelTag extends WebUITag {

	private List<Tab> tabs = new ArrayList<Tab>();
	
	private String selectedTab;

	@Override
	protected void initContext(Map<String, Object> context) {
		context.put("tabs", tabs);

	}

	@Override
	protected void reset() {
		super.reset();
		this.tabs.clear();
	}

	public List<Tab> getTabs() {
		return tabs;
	}

	public void setTabs(List<Tab> tabs) {
		this.tabs = tabs;
	}

	public void addTab(Tab tab) {
		this.tabs.add(tab);

	}

	public String getSelectedTab() {
		return selectedTab;
	}

	public void setSelectedTab(String selectedTab) {
		this.selectedTab = selectedTab;
	}

}
